//
//  XieYiViewController.m
//  BeautyPicture
//
//  Created by LiuNa on 16/3/9.
//  Copyright © 2016年 szb. All rights reserved.
//

#import "XieYiViewController.h"
#import "BPhttpTool.h"


@interface XieYiViewController ()
@property (nonatomic, strong) NSDictionary *xieYidic;
@end

@implementation XieYiViewController




- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.xieYidic = [NSDictionary dictionary];
    [self.view addSubview:self.web];
    self.web.backgroundColor = [UIColor whiteColor];
    [self create];
    //[self createXieYi];
    
    // Do any additional setup after loading the view.
}

- (void)create{
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(self.view.frame.size.width / 2 - 80, 66, self.view.frame.size.width - 5, 30)];
    label.text = @"天天美印服务协议";
    label.textColor = [UIColor blackColor];
    label.font = [UIFont systemFontOfSize:20];
//    [self.view addSubview:label];
    
    self.title = label.text;
}


- (void)createXieYi{
    [BPhttpTool get:@"http://ttmy.len.so/app/appapi/xieyi" params:nil success:^(id responseObj) {
       
        self.xieYidic = responseObj;
        [self createLabel];
        NSLog(@"%@", [self.xieYidic objectForKey:@"content"]);
    } failure:^(NSError *error) {
        
    }];
}

- (void)createLabel{
//    UILabel *xieyiLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 110, self.view.frame.size.width, self.view.frame.size.height - 110)];
//    xieyiLabel.text = [self.xieYidic objectForKey:@"content"];
//    xieyiLabel.backgroundColor = [UIColor yellowColor];
//    xieyiLabel.numberOfLines = 0;
//    xieyiLabel.textColor = [UIColor grayColor];
//    [self.view addSubview:xieyiLabel];
//    

}





- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
